package com.ruoyi.tongji.utils;

import java.util.Calendar;
import java.util.Date;

public class DateUtils {
    public static String getMonth(Date date) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(date);
        int month = cal.get(Calendar.MONTH) + 1;

        return String.valueOf(month);
    }

    public static void main(String[] args) {
        System.out.println(DateUtils.getMonth(new Date()));
    }
}
